package com.dk.demo.web.api;


import com.dk.common.defs.CommonDefs;
import com.dk.common.result.ApiResult;
import com.dk.demo.common.model.DatasetDTO;
import com.dk.demo.core.service.DatasetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping(CommonDefs.RESTFUL_URI_CONTEXT+"/dataset")
public class DatasetApi {


    @Autowired
    private DatasetService datasetService;


    @PostMapping("/save")
    public ApiResult<Long> save(DatasetDTO datasetDTO) {
        return ApiResult.success(datasetService.save(datasetDTO));
    }
}
